package com.yunhe.authority.repository.option;

import com.yunhe.authority.domain.option.Item;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @ClassName ItemRepository
 * @Description TODO
 * @Author HeTao
 * @Date 2021/2/25 9:42
 * @Version 1.0
 **/
@Repository
public interface ItemRepository extends Neo4jRepository<Item, Long> {
    @Query("match(e:Enum{name:{name}})-[:HAS_ITEM]->(i:Item) return i")
    Iterable<Item> findAllItems(@Param("name") String system);
}
